package com.hzw.saas.api.user.query;

import javax.validation.constraints.Pattern;

import com.hzw.saas.common.util.AccountValidatorUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 用户账户获取参数
 * 所有参数都可唯一确定一条账户信息
 *
 * @author zzl
 * @since 04/08/2021
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "用户账户获取参数", description = "所有参数都可唯一确定一条账户信息")
public class UserAccountGetQuery {

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名", position = 2)
    private String userName;

    /**
     * 电话号码
     */
    @ApiModelProperty(value = "电话号码", position = 4)
    @Pattern(regexp = AccountValidatorUtil.REGEX_MOBILE_OR_BLANK, message = "手机号码格式不正确")
    private String phoneNo;

    /**
     * 邮箱地址
     */
    @ApiModelProperty(value = "邮箱地址", position = 5)
    @Pattern(regexp = AccountValidatorUtil.REGEX_EMAIL_OR_BLANK, message = "邮箱格式不正确")
    private String email;

}
